package API.DAY1;

public class StringDemo {
    public static void main(String[] args) {
        String a = "abc" ;
        String b = "abc" ;
//        System.out.println(a==b);
        String c = "abc" ;
//        System.out.println(a==c);
        String d = new String("abc");
//        System.out.println(a==d);

        a = a+"!";
//        System.out.println(a==b);
        String e = "ab"+"c";
//        System.out.println(b==e);
        String f = "ab";
        f = f+"c";
//        System.out.println(b==f);

        String x = "abc";
        String y = new String("abc");
        System.out.println(x==y);
        System.out.println(x.equals(y));
    }
}
